Skip to main content

Components Basics

Here are some basic properties that are common across all components. Here, we'll introduce each property briefly. More detailed information about properties specific to individual components can be found on their respective pages.

Basic Structure of Components

Each component behaves like a flex item in a flex container, allowing you to easily create a responsive UI layout. For more information on the layout system, click here.

Furthermore, each component has the following basic structure:

  • A component can have one or more states (normal, hover, active, focus, disabled, error, readonly).
  • Each component has a background color for each state.
  • Each component has a border for each state.
  • Each component can maintain self-defined spacings to its content or to other components. Refer to the Spacings section for more details.

BasicElement1

Basic Properties

The following properties are common to every component.

METAread more
---y-base__component-id

The identifier of the component that is unique within a page.

---y-base__component-type

The type of the component. For this component it is y-base.

---y-base__name

The custom name of the component. It serves for better identification of the component.

---y-base__version

The custom version of the Base-component. This can be used to ensure that all components work well together.

---y-base__core-theme

The CoreTheme, which will be apllied to the Base. For further information on themes visit the themes page.

---y-base__sub-theme

The subtheme subordinated to the previously specified CoreTheme, which will be apllied to the Base. For further information on themes visit the themes page.

---y-base__group-theme

The group theme is a further variation of the subtheme which is specified especially for variations of a component inside the subtheme. For further information on themes visit the Theme-Manager page.

DISPLAYread more
---y-base__display

This property specifies the display behavior of the component. This can be be set to:

  • none
  • block
  • flex
  • inline
---y-base__position

This property specifies the type of positioning method used for the component. This can be be set to:

  • static
  • relative
  • absolute
  • sticky
  • fixed
---y-base__visible

This property can toggle the visibility of the component. The two modes are completely hidden and fully shown.

SIZEread more
---y-base__min-width

The minimum value for the width of the component. This can be set in:

  • px
  • pt
  • em
  • vw
  • vh
  • %
---y-base__min-height

The minimum value for the height of the component. This can be set in:

  • px
  • pt
  • em
  • vw
  • vh
  • %

The value for the width of the component. This can be set in:

  • px
  • pt
  • em
  • vw
  • vh
  • %
  • auto

The value for the height of the component. This can be set in:

  • px
  • pt
  • em
  • vw
  • vh
  • %
  • auto
---y-base__max-width

The maximum value for the width of the component. This can be set in:

  • px
  • pt
  • em
  • vw
  • vh
  • %
  • none
---y-base__max-height

The maximum value for the height of the component. This can be set in:

  • px
  • pt
  • em
  • vw
  • vh
  • %
  • none
---y-base__flex

The flex property sets the length on flexible items. This sets the value in n-fold shares extrapolated to all other components with the flex display within the same container.

PLACEMENTread more
---y-base__margin-top

This property creates a space around the component, outside of the top border. This can be set in percent or pixels.

---y-base__margin-right

This property creates a space around the component, outside of the right border. This can be set in percent or pixels.

---y-base__margin-bottom

This property creates a space around the component, outside of the bottom border. This can be set in percent or pixels.

---y-base__margin-left

This property creates a space around the component, outside of the left border. This can be set in percent or pixels.

---y-base__padding-top

This property creates a space within the component, inside of the top border. This can be set in percent or pixels.

---y-base__padding-right

This property creates a space within the component, inside of the right border. This can be set in percent or pixels.

---y-base__padding-bottom

This property creates a space within the component, inside of the bottom border. This can be set in percent or pixels.

---y-base__padding-left

This property creates a space within the component, inside of the top border. This can be set in percent or pixels.

Generic

Generic > Meta

Only abstract properties, that won't have a direct influence on the look and structure of the component, occur in the meta-group. Properties from this group can only be edited via Detail Panel.

componentId

NumberProperty

The componentID is the identifier of the component, which is unique inside a page. The componentID is used for:

  • Addressing components in functions
  • Modifying the component's configuration via JavaScript
  • Linking event functions with a component
info

This property is read-only and is assigned by the system.

componentType

StringProperty

The componentType is the type of the component. With the help of the component type and the component id, a component can be uniquely addressed. The component type is mostly used to provide meta-information or to verify that the correct element has been addressed. In the Components-Section inside the documentation's sidebar you will find a list of all possible component types.

info

This property is read-only and is assigned by the system.

name

StringProperty

The name is the custom name of the component, which is used for better identification of the component.

version

:::warnung This property is no longer needed and will be deprecated in the future. :::

coreTheme

StringProperty

Themes are associated with a CoreTheme. This allows a CoreTheme to include multiple SubThemes as well as additional theme data. To apply a theme, the CoreTheme must be selected first, followed by an associated SubTheme. For more information on themes, please refer to themes.

subTheme

StringProperty

When a CoreTheme is selected, the applicable SubTheme containing the component styles is chosen here.

groupTheme

StringProperty

The theme group contains specific component variations within the SubTheme.

danger

This functionality has not been integrated yet.

Generic > Display

In the display group properties occur that will influence the way the component is displayed and arranged with its neighboring components.

display

ListProperty

This property specifies the display behavior of the component. This can be set to:

none block flex inline

Some of the display property's specifications are set in different properties according to the selected value of the display property. For example, when flex is selected further specification can be done in the flex property.

position

ListProperty

This property specifies the type of positioning method used for the component. Derzeit wird nur static unterstützt. A position is always specified by top, bottom, left or right values. Depending on the selected value for the position, the starting point for those values will differ.

info

In the future, additional options such as relative, absolute, sticky, and fixed will also be made available.

visible

ListProperty

This property can toggle the visibility of the component. There are three options:

  • inherit
    The visibility is inherited from an outer component.
  • hidden
    The component is invisible.
  • visible
    The component is visible.

This will only hide the element, however if you want to prevent the element from loading you should set the display property to "none".

Generic > Size

sizing

In the sizing group properties define the size of the yComponent. You can either set hard values for size, or alternatively rely on the flex box system, where you will only have to set the min- and max-sizes. PB1_SizingPicker

These properties allow for precise control over the dimensions of the component, including setting constraints on its maximum and minimum sizes.

  • width:
    Specifies the width of the component.
  • maxWidth:
    Sets the maximum width that the component can have.
  • minWidth:
    Defines the minimum width that the component can have.
  • height:
    Specifies the height of the component.
  • maxHeight:
    Sets the maximum height that the component can have.
  • minHeight:
    Defines the minimum height that the component can have.

flex

StringProperty

The flex property sets the length on flexible items. This sets the value in n-fold shares extrapolated to all other components with flex-display within the same container. This property's functionality works well together with setting a max-width and max-height to set an upper limit in size or min-width and min-height to set a lower limit in size.

Generic > Placement

In the placement group properties can be adjusted that influence the distances to neighboring elements outside and included elements inside. PB1_SpacingPicker

info

margin

These properties allow you to define the spacing between the edges of the component and its surrounding elements in each direction.

The list summarizes properties related to the margin:

  • marginTop:
    Specifies the margin at the top of the component.
  • marginRight:
    Specifies the margin on the right side of the component.
  • marginBottom:
    Specifies the margin at the bottom of the component.
  • marginLeft:
    Specifies the margin on the left side of the component.

padding

These properties allow you to define the spacing between the content of the component and its border in each direction.

The list summarizes properties related to the padding:

  • paddingTop:
    Specifies the padding at the top of the component.
  • paddingRight:
    Specifies the padding on the right side of the component.
  • paddingBottom:
    Specifies the padding at the bottom of the component.
  • paddingLeft:
    Specifies the padding on the left side of the component.

Style

The style category contains properties that configure the look and feel of the component. Some of these properties are the same for all components, some are added specifically for a certain component. In this case only the style properties that are general should be explained.

Style > Background

In this background group the appearance of the background can be adjusted. For most components only the bgColor property can be found in this group.

bgColor

ColorProperty

The bgColor is the color of the background. This can be set as a color from a palette or a custom hex color. Each component state has its own background color. PB1_ColorPicker

Style > Border

Properties that will change the appearance of the components border can be found in the border group. Some properties are responsible for only one of the borders in the top, bottom, left or right. Other properties are responsible for all four of them at once. Toolbar_BorderExtension

color

Here, a separate color can be set for each edge. The colors can also be chosen differently for each state.

Property names for each edge:

  • borderTopColor:
    Color of the top border
  • borderRightColor:
    Color of the right border
  • borderBottomColor:
    Color of the bottom border
  • borderLeftColor:
    Color of the left border

style

Border style defines the style of the border of an element, such as solid, dashed or dotted. Border1 Border2 Border3

Property names for each edge:

  • borderTopStyle
    Style of the top border
  • borderRightStyle
    Style of the right border
  • borderBottomStyle
    Style of the bottom border
  • borderLeftStyle
    Style of the left border

width

Specifies the width of the border of an element.

Property names for each edge:

  • borderTopWidth
    Width of the top border
  • borderRightWidth
    Width of the right border
  • borderBottomWidth
    Width of the bottom border
  • borderLeftWidth
    Width of the left border

borderRadius

Defines the rounding of the corners. Applies to all states and edges.

Style > Shadow

Properties concerning the appearance of the shadow around the component can be adjusted in the shadow group. For most components only the box shadow property can be found in this group.

Shadow1

For this example shadow the settings were: x=50 y=50 blur=0 spread=0. The x and y values will move the whole shadow. For positive x-values the shadow will be moved to the right, for negative ones to the left. For positive y-values the shadow will be moved to the bottom, for negative ones to the top. The unit of the values is pixels in all cases.

Shadow2

For this example shadow the settings were: x=50 y=50 blur=5 spread=0. The blur value is also given in pixels and will blur the shadow depending on the value, the higher the value the more intense the blur. The value has to be positive, negative values are forbidden.

Shadow3

For this example shadow the settings were: x=50 y=50 blur=5 spread=30-. The spread value is also given in pixels. This value is responsible for making the shadow, which by default is the same width and height as its component, bigger or smaller. A positive value will increase the width and height of the shadow a negative value will decrease it.

PB1_ShadowPicker

boxShadow

StringProperty

The shadow of the component. This is set by the four sub-properties x, y, blur and spread of the shadow property, which can be further read about in the shadow property section.

Style > Opacity

In the opacity group you can find properties concerning the opacities of areas belonging to the component. For most components only the opacity property can be found in this group.

opacity

NumberProperty

The opacity of all colored parts of the component. This value is set in percent.

Events

Everything related to events can be set in this section. The custom function calls and remote procedure calls are also made in this section.

Events > Lifecycle

This is where you can manage the events associated with the lifecycle of the component.

EvtInit

This section allows you to access the editor for defining the component's init function. Within this editor, you can write custom JavaScript code, which gets executed whenever the component is fully mounted.